package com.baijiaoxi.common.model.file;

import com.baijiaoxi.common.utils.jdk.MathUtil;

public class FileSize {
    protected Long sizeKB;
    protected String sizeMB;

    public FileSize(Long sizeKB) {
        this.sizeKB = sizeKB;
        this.sizeMB = String.valueOf(MathUtil.roundUp(sizeKB / 1024.0, 2));
    }

    public Long getSizeKB() {
        return sizeKB;
    }

    public String getSizeKBAsString() {
        return String.valueOf(sizeKB);
    }

    public String getSizeMB() {
        return sizeMB;
    }
}